package com.talent.web.mqtt.handler;

import org.springframework.messaging.Message;
import org.springframework.messaging.MessageHandler;
import org.springframework.messaging.MessageHeaders;
import org.springframework.messaging.MessagingException;
import org.springframework.stereotype.Service;

/**
 * @Author: hszhou
 * @Date: 2025/1/8 21:07
 * @Description: 必须描述类做什么事情, 实现什么功能
 */
@Service
public class ReceiveMessageHandler implements MessageHandler {
    @Override
    public void handleMessage(Message<?> message) throws MessagingException {

        Object payload = message.getPayload();
        System.out.println("接收到消息：" + payload);
        MessageHeaders headers = message.getHeaders();

    }
}
